package cn.edu.xjtu.android.emoji_warfare_android.game.item;

import android.graphics.Canvas;
import cn.edu.xjtu.android.emoji_warfare_android.engine.Item;
import cn.edu.xjtu.android.emoji_warfare_android.engine.ScreenBoundary;
import cn.edu.xjtu.android.emoji_warfare_android.game.Config;

/**
 * 可捡拾盾牌
 * 
 * @author bill
 *
 */
public class SheildItem extends Item {
    private static float half;

    public SheildItem(float birthX, float birthY, ScreenBoundary boundary) {
        super(birthX, birthY, Config.Item.sheildOutline, boundary);
        this.randomDirect(Config.Item.speed);
    }

    public SheildItem(ScreenBoundary boundary) {
        this(0, 0, boundary);
    }

    @Override
    public boolean onDraw(Canvas canvas) {
        canvas.drawBitmap(Config.Item.image[4], -half, -half, Config.Common.bitmapPaint);
        return false;
    }

    static {
        half = Config.Item.len / 2.0f;
    }
}
